import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {LoginComponent} from "./components/login/login.component";
import {P401Component} from "./components/p401/p401.component";
import {P403Component} from "./components/p403/p403.component";

const routes: Routes = [
  { path: '', pathMatch: 'full', redirectTo: '/login' },
  {path:'login',component:LoginComponent},
  {path:'p401',component:P401Component},
  {path:'p403',component:P403Component},
  { path: 'admin', loadChildren: () => import('./pages/admin/admin.module').then(m => m.AdminModule) },
  { path: 'auth', loadChildren: () => import('./pages/auth/auth.module').then(m => m.AuthModule) },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
